﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ctrl="clr-namespace:WebDevUtilities.CssSpriteGenerator.Controls"
             x:Class="WebDevUtilities.CssSpriteGenerator.CssSpriteGeneratorToolWindowControl"
             Background="{DynamicResource VsBrush.Window}"
             Foreground="{DynamicResource VsBrush.WindowText}"
             mc:Ignorable="d"
             x:Name="CssSpriteGeneratorToolWindow" d:DesignWidth="300.828" d:DesignHeight="493.546">
    <!--<Control.Resources>
        <ObjectDataProvider
            MethodName="GetValues"
            ObjectType="{x:Type System:Enum}"
            x:Key="ImgFileExtension">
            <ObjectDataProvider.MethodParameters>
                <x:Type xmlns="clr-namespace:WebDevUtilities.CssSpriteGenerator.Logic" TypeName="ImageFileExtension"></x:Type>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Control.Resources>-->
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Label x:Name="LblPaths" Content="Paths" Grid.Row="0" Grid.Column="0" FontWeight="Bold" />
                <Label x:Name="LblOutputCssName" Content="output css name:" Grid.Row="1" Grid.Column="0" />
                <TextBox x:Name="TbOutputCssName" Grid.Column="1" Grid.Row="1" Margin="0,5,61,5" ToolTip="Enter the name of the generated stylesheet." />
                <ComboBox x:Name="CbOutputCssExt" SelectedIndex="0" Grid.Column="1" Grid.Row="1" Width="55" Height="22" HorizontalAlignment="Right" BorderThickness="1" Margin="0,5,5,5" VerticalAlignment="Center" />
                <Label x:Name="LblOutputImageName" Content="output image name:" Grid.Row="2" Grid.Column="0" />
                <TextBox x:Name="TbOutputImageName" Grid.Column="1" Grid.Row="2" Margin="0,5,61,5" ToolTip="Enter the name of the generated image sprite." />
                <ComboBox x:Name="CbOutputImageExt" Grid.Column="1" Grid.Row="2" Width="55" Height="22" HorizontalAlignment="Right" BorderThickness="1" Margin="0,5,5,5" VerticalAlignment="Center" SelectedIndex="0" />
                <!-- ItemsSource="{Binding Source={StaticResource ImgFileExtension}}" DisplayMemberPath="Value" SelectedValuePath="Key" -->
                <Expander x:Name="ExpMorePaths" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Header="more path options" >
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <CheckBox x:Name="ChkBoxUseCustomCssPath" Grid.Column="0" Grid.Row="0" Content="Use custom css path:" Margin="5" Checked="ChkBoxUseCustomCssPathChecked" />
                        <TextBox x:Name="TbCustomCssPath" Grid.Column="1" Grid.Row="0" Margin="0,5,5,5" IsEnabled="False" />
                        <CheckBox x:Name="ChkBoxUseCustomImgPath" Grid.Column="0" Grid.Row="1" Content="Use custom image path:" Margin="5" Checked="ChkBoxUseCustomImgPath_Checked" />
                        <TextBox x:Name="TbCustomImgPath" Grid.Column="1" Grid.Row="1" Margin="0,5,5,5" IsEnabled="False" />
                    </Grid>
                </Expander>
            </Grid>
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Label x:Name="LblLayout" Content="Layout" Grid.Row="0" Grid.Column="0" FontWeight="Bold" />
                <RadioButton x:Name="RbAutomatic" Content="Automatic" Grid.Row="1" Grid.Column="0" IsChecked="True" Margin="5" />
                <RadioButton x:Name="RbHorizontal" Content="Horizontal" Grid.Row="2" Grid.Column="0" Margin="5" />
                <RadioButton x:Name="RbVertical" Content="Vertical" Grid.Row="3" Grid.Column="0" Margin="5" />
                <RadioButton x:Name="RbRectangular" Content="Rectangular" Grid.Row="4" Grid.Column="0" Margin="5,5,5,5" Unchecked="RbRectangularUnchecked" Checked="RbRectangularChecked" />
                <StackPanel x:Name="StkPnlLayoutRectangular" Orientation="Horizontal" Grid.Row="4" Grid.Column="1" IsEnabled="False" >
                    <ctrl:NumUpDown x:Name="NumImagesInRow" Margin="0" />
                    <Label Content="x" Margin="0,5" />
                    <ctrl:NumUpDown x:Name="NumImagesInCol" Margin="0" />
                    <Label Content="images" Margin="0,5" />
                </StackPanel>
                <Label x:Name="LblDistanceBetweenImages" Content="Distance between images:" Grid.Row="5" Grid.Column="0" />
                <ctrl:NumUpDown x:Name="NumDistanceBetweenImages" Grid.Row="5" Grid.Column="1" Margin="5" />
                <Label x:Name="LblMarginWidth" Content="Margin width:" Grid.Row="6" Grid.Column="0" />
                <ctrl:NumUpDown x:Name="NumMarginWidth" Grid.Row="6" Grid.Column="1" Margin="5" />
            </Grid>
            <Grid Grid.Row="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Label x:Name="LblCssClasses" Content="CSS-Classes" Grid.Row="0" Grid.Column="0" FontWeight="Bold" />
                <RadioButton x:Name="RbUseImagefilename" Content="Use Image-Filename" Grid.Row="1" Grid.Column="0" GroupName="CssClass" Checked="RbUseImagefilenameChecked" Margin="5" IsChecked="True" />
                <RadioButton x:Name="RbUseCustomClassname" Content="Use custom classname:" ToolTip="After the name it will be added a incremented number: 'yourcustomclassname-0'" Grid.Row="2" Grid.Column="0" GroupName="CssClass" Checked="RbUseCustomClassnameChecked" Margin="5" />
                <TextBox x:Name="TbCustomClassname" Grid.Row="2" Grid.Column="1" Margin="0,5,5,5" IsEnabled="False" />
                <Label x:Name="LblSpriteClassname" Grid.Row="3" Grid.Column="0" Content="Sprite classname:" />
                <TextBox x:Name="TbSpriteClassname" Grid.Row="3" Grid.Column="1" Text="sprite" Margin="0,5,5,5" />
            </Grid>
            <Grid Grid.Row="3" VerticalAlignment="Bottom">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" Grid.Row="0" Content="_Generate" Height="25" x:Name="BtnGenerate" HorizontalAlignment="Left" VerticalAlignment="Bottom" Click="BtnGenerateClick" Width="75" Margin="10,10,0,10" Grid.ColumnSpan="2"/>
                <TextBlock Grid.Column="1" Grid.Row="0" TextWrapping="Wrap" Margin="10" x:Name="TxtVersion" FontSize="10" Text="v1.0" HorizontalAlignment="Right" VerticalAlignment="Bottom" />
            </Grid>
        </Grid>
    </ScrollViewer>
</UserControl>